home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / ToolUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-31  |  3.6 KB  |  144 lines  |  [TEXT/MMCC]

  1. /*
  2.     File:        ToolUtils.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __TOOLUTILS__
  13. #define __TOOLUTILS__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. /*    #include <ConditionalMacros.h>                                */
  18. /*    #include <MixedMode.h>                                        */
  19. /*        #include <Traps.h>                                        */
  20. #endif
  21.  
  22. #ifndef __QUICKDRAW__
  23. #include <Quickdraw.h>
  24. /*    #include <QuickdrawText.h>                                    */
  25. /*        #include <IntlResources.h>                                */
  26. #endif
  27.  
  28. #ifndef __TEXTUTILS__
  29. #include <TextUtils.h>
  30. /*    #include <Script.h>                                            */
  31. /*        #include <Events.h>                                        */
  32. /*            #include <OSUtils.h>                                */
  33. #endif
  34.  
  35. #ifndef __FIXMATH__
  36. #include <FixMath.h>
  37. #endif
  38.  
  39. enum  {
  40.     sysPatListID                = 0,
  41.     iBeamCursor                    = 1,
  42.     crossCursor                    = 2,
  43.     plusCursor                    = 3,
  44.     watchCursor                    = 4
  45. };
  46.  
  47. #if defined(powerc) || defined (__powerc)
  48. #pragma options align=mac68k
  49. #endif
  50. struct Int64Bit {
  51.     long                        hiLong;
  52.     unsigned long                loLong;
  53. };
  54. #if defined(powerc) || defined(__powerc)
  55. #pragma options align=reset
  56. #endif
  57.  
  58. typedef struct Int64Bit Int64Bit;
  59.  
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63.  
  64. extern pascal Fixed FixRatio(short numer, short denom)
  65.  ONEWORDINLINE(0xA869);
  66. extern pascal Fixed FixMul(Fixed a, Fixed b)
  67.  ONEWORDINLINE(0xA868);
  68. extern pascal short FixRound(Fixed x)
  69.  ONEWORDINLINE(0xA86C);
  70. extern pascal void PackBits(Ptr *srcPtr, Ptr *dstPtr, short srcBytes)
  71.  ONEWORDINLINE(0xA8CF);
  72. extern pascal void UnpackBits(Ptr *srcPtr, Ptr *dstPtr, short dstBytes)
  73.  ONEWORDINLINE(0xA8D0);
  74. extern pascal Boolean BitTst(const void *bytePtr, long bitNum)
  75.  ONEWORDINLINE(0xA85D);
  76. extern pascal void BitSet(void *bytePtr, long bitNum)
  77.  ONEWORDINLINE(0xA85E);
  78. extern pascal void BitClr(void *bytePtr, long bitNum)
  79.  ONEWORDINLINE(0xA85F);
  80. extern pascal long BitAnd(long value1, long value2)
  81.  ONEWORDINLINE(0xA858);
  82. extern pascal long BitOr(long value1, long value2)
  83.  ONEWORDINLINE(0xA85B);
  84. extern pascal long BitXor(long value1, long value2)
  85.  ONEWORDINLINE(0xA859);
  86. extern pascal long BitNot(long value)
  87.  ONEWORDINLINE(0xA85A);
  88. extern pascal long BitShift(long value, short count)
  89.  ONEWORDINLINE(0xA85C);
  90. #if !defined(powerc) && !defined(__powerc)
  91. extern pascal void LongMul(long a, long b, Int64Bit *result)
  92.  ONEWORDINLINE(0xA867);
  93. #else
  94. #define LongMul(a, b, result) ((void) WideMultiply((a), (b), (wide*)(result)))
  95.  
  96. #endif
  97.  
  98. extern pascal Handle GetIcon(short iconID)
  99.  ONEWORDINLINE(0xA9BB);
  100. extern pascal void PlotIcon(const Rect *theRect, Handle theIcon)
  101.  ONEWORDINLINE(0xA94B);
  102. extern pascal PatHandle GetPattern(short patternID)
  103.  ONEWORDINLINE(0xA9B8);
  104. extern pascal CursHandle GetCursor(short cursorID)
  105.  ONEWORDINLINE(0xA9B9);
  106. extern pascal PicHandle GetPicture(short pictureID)
  107.  ONEWORDINLINE(0xA9BC);
  108. extern pascal Fixed SlopeFromAngle(short angle)
  109.  ONEWORDINLINE(0xA8BC);
  110. extern pascal short AngleFromSlope(Fixed slope)
  111.  ONEWORDINLINE(0xA8C4);
  112. extern pascal long DeltaPoint(Point ptA, Point ptB)
  113.  ONEWORDINLINE(0xA94F);
  114. extern pascal void ShieldCursor(const Rect *shieldRect, Point offsetPt)
  115.  ONEWORDINLINE(0xA855);
  116. extern pascal void ScreenRes(short *scrnHRes, short *scrnVRes)
  117.  SIXWORDINLINE(0x225F, 0x32B8, 0x0102, 0x225F, 0x32B8, 0x0104);
  118. extern pascal void GetIndPattern(Pattern *thePat, short patternListID, short index);
  119. extern void shieldcursor(const Rect *shieldRect, Point *offsetPt);
  120. extern long deltapoint(Point *ptA, Point *ptB);
  121.  
  122. /* Obsolete Math Routines */
  123.  
  124. #if false
  125. extern pascal short HiWord(long x)
  126.  ONEWORDINLINE(0xA86A);
  127. #endif
  128.  
  129. #define HiWord(x) ((short)((long)(x) >> 16))
  130.  
  131. #if false
  132. extern pascal short LoWord(long x)
  133.  ONEWORDINLINE(0xA86B);
  134. #endif
  135.  
  136. #define LoWord(x) ((short)(x))
  137.  
  138. #ifdef __cplusplus
  139. }
  140. #endif
  141.  
  142. #endif
  143.  
  144.